<html>
<head><meta charset="utf-8"><title>3-BSD dependencies in rustc · t-core/licensing · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/index.html">t-core/licensing</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html">3-BSD dependencies in rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197081223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197081223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197081223">(May 10 2020 at 21:59)</a>:</h4>
<p>I've been tasked with reviewing <a href="https://github.com/rust-lang/rust/issues/72062" title="https://github.com/rust-lang/rust/issues/72062">#72062</a>, which adds a target with a custom linker script, which is licensed under the 3-Clause BSD license (I believe). Outside of some Fuchsia-specific dependencies we do not allow dependencies to have this license, and the license explicitly asks that</p>
<blockquote>
<p>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</p>
</blockquote>
<p>...but I don't think we're currently doing this. What is our current policy for this, and how should I proceed here?</p>



<a name="197083823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197083823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197083823">(May 10 2020 at 22:58)</a>:</h4>
<p>You are correct that we would have to distribute the license for the linker script along with the linker script  when we distribute the linker script "in source or binary form".</p>
<ul>
<li>First of all, linker scripts don't have a binary form, so we can ignore that case.</li>
<li>Second, it appears that the linker script's license is in the linker script file itself, so any time we include the linker script in a distribution we'd also be complying with the license.</li>
</ul>
<p>So I don't know if an exception <em>should</em> be made in this case, but if an exception <em>were</em> to be made it would place no additional burden on the project.</p>
<p>Also, linker script files are trivial enough to write that you could reasonably ask the person making the PR to just write their own linker script to do all the same important steps using the standard rust licensing.</p>



<a name="197083840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197083840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197083840">(May 10 2020 at 22:59)</a>:</h4>
<p>The linker script would be <code>include!</code>d into the rustc binary in this case, so I'm not sure what that counts as</p>



<a name="197083956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197083956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197083956">(May 10 2020 at 23:01)</a>:</h4>
<p>Well that's in a binary, but ultimately linker scripts only have the one textual form. It's like how TOML or XML doesn't have a source and binary split, it's just textual no matter what. There's no "compilation" step a linker script goes through.</p>



<a name="197084008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197084008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197084008">(May 10 2020 at 23:02)</a>:</h4>
<p>Though now that you mention it being via <code>include!</code>, I guess someone might reasonably say we'd need a way for an end user to <em>see</em> the license contained in the included file.</p>



<a name="197084108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197084108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197084108">(May 10 2020 at 23:05)</a>:</h4>
<p>As a person who at one point had to read through the <code>ld</code> docs and write their own linker script for building rust for the GBA, it's not an undue burden to ask for them to just make a new linker script. Like half the text in that script in the PR is just boilerplate junk that probably doesn't apply to actual PSP builds.</p>
<p>For example, Rust almost assuredly doesn't use all those debug formats with PSP builds, that's just the same copy-pasta everyone seems to put in linker scripts by default.</p>



<a name="197084178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197084178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197084178">(May 10 2020 at 23:07)</a>:</h4>
<p>That might be an issue when linking in C code though</p>



<a name="197084505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/231349-t-core/licensing/topic/3-BSD%20dependencies%20in%20rustc/near/197084505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/231349-t-core/licensing/topic/3-BSD.20dependencies.20in.20rustc.html#197084505">(May 10 2020 at 23:17)</a>:</h4>
<p>That's true.</p>
<p>I'm not really familiar with the PSP beyond "handheld from mid/late 2000s", so I don't know how much a programmer would need to assume some sort of C standard library being linked in. The person could of course have any debug symbol directives in their new linker script if they want. If they were missing the worst that would happen is that you'd miss out on some debug <em>info</em>, it wouldn't cause any functions to go missing from the final binary.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>